package com.cll.prototype.common.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.cll.prototype.common.util.LocalDateTimeConverter;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 用户服务的表
 * </p>
 *
 * @author CLL
 * @since 2020-10-26
 */
@Data
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 邮箱
     */
    private String email;

    private String password;

    /**
     * 创建时间
     * 注解@JsonSerialize指定序列化方式返回给前台
     */
    @JsonSerialize(using = LocalDateTimeConverter.class)
    private LocalDateTime gmtCreate;


}
